<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改服务商信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-agentInfo-updateAgent">
        <input name="agentNum"  type="hidden"  th:value="${agentNum}" />
        <div class="form-group">
            <label class="col-sm-3 control-label">服务商名称：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" required readonly="readonly" name="oldAgentName" th:value="${agentInfo.agentName}"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">新的服务商名称：</label>
            <div class="col-sm-8">
                <input class="form-control" required type="text" id="agentName"  name="agentName">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
    var prefix = ctx + "agentInfo/agentInfo";
    $("#form-agentInfo-resetPwd").validate({
        rules:{
            password:{
                required:true,
                minlength: 5,
                maxlength: 20
            },
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            if($.common.isEmpty($("#agentName").val())){
                $.modal.msgError("新的服务商名称不可为空");
                return;
            }
            $.operate.save(prefix + "/updateAgentAll", $('#form-agentInfo-updateAgent').serialize());
        }
    }
</script>
</body>

</html>
